package com.dong.springaop.advice;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * description
 *
 * @author Administrator 2021/09/13 19:00
 */
public class MyAroundAdvice implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println("Before: invocation=[" + methodInvocation + "]");
        Object obj = methodInvocation.proceed();
        System.out.println("Invocation returned");
        return obj;
    }
}
